package com.yilijk.base.utils;

import com.alibaba.android.arouter.launcher.ARouter;
import com.yilijk.base.BaseApi;
import com.yilijk.base.network.config.BaseRouter;
import com.yilijk.base.network.RequestParams;

import org.json.JSONObject;

/**
 * Created by SHICHENG
 * <p>
 * Time on 2022/03/07
 */
public class OpenUtils {

    private static BaseApi baseApi;

    private static OpenUtils openUtils;

    public static synchronized OpenUtils getInstance(){
        if (openUtils == null){
            openUtils = new OpenUtils();
        }
        if (baseApi == null){
            baseApi = (BaseApi) ARouter.getInstance().build(BaseRouter.Base).navigation();
        }
        return openUtils;
    }

    public boolean isOpenAttestation(){
        return baseApi.isOpenAttestation();
    }
    public String[] rnUpdataUrl(){
        return baseApi.rnUpdataUrl();
    }

    public String getApkType(){
        return baseApi.getApkType();
    }

    public boolean isUserAgreeChecked(){
        return baseApi.isUserAgreeChecked();
    }

    public boolean isOpenSendEvent(){
        return baseApi.isOpenSendEvent();
    }

    public RequestParams getClickParams(JSONObject jsonObject){
        return baseApi.getClickParams(jsonObject);
    }

}
